﻿#region Usings

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate;
using NetScrum.Model.Entities;

#endregion

namespace NetScrum.Model.Repository.Impl
{
    public class ProjectRepositoryNHibernate : RepositoryBase, ProjectRepository
    {
        internal ProjectRepositoryNHibernate()
        {
        }
        
        public ProjectRepositoryNHibernate(ISession session)
            : base(session)
        {
        }
        
        #region ProjectRepository Members

        public void SaveOrUpdate(NetScrum.Model.Entities.Project project)
        {
            this.Session.SaveOrUpdate(project);
        }

        public Project FindById(int projectId)
        {
            return this.Session.Load<Project>(projectId);
        }

        #endregion
    }
}
